<template>
	<view>
		<view class="notice-container" @click="readNotice">
			<image class="notice-icon" src="/static/icons/tongzhi.png"></image>
			<text class="notice-title">公告：{{ notice.noticeTitle }}</text>
		</view>
		
		<!-- 阅读弹窗 -->
		<uni-popup ref="noticePop" type="center">
			<view class="uni-tip">
				<view class="uni-tip-content">
					<rich-text :nodes="notice.noticeContent"></rich-text>
				</view>
				<view class="uni-tip-group-button">
					<text class="uni-tip-button" @click="cancelNotice">确定</text>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		
		props: [
			"notice"
		],
		methods: {
			readNotice() {
				// 阅读公告
				this.$refs.noticePop.open()
			},
			cancelNotice() {
				this.$refs.noticePop.close()
			}
		}
	}
</script>

<style>
@import url('./index.css')
</style>
